package wan.com.templateproject;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.repository.support.Repositories;
import org.springframework.scheduling.annotation.EnableScheduling;
import wan.com.templateproject.service.PeopleService;
import wan.com.templateproject.service.impl.TimerTaskImpl;

import javax.annotation.Resource;
import java.util.Calendar;
import java.util.Timer;
import java.util.TimerTask;

@Slf4j
@EnableScheduling
@SpringBootApplication
public class TemplateProjectApplication implements CommandLineRunner{

    @Resource
    private PeopleService peopleService;

    public static void main(String[] args) {
        SpringApplication.run(TemplateProjectApplication.class, args);
    }

    @Override
    public void run(String... args) throws InterruptedException {
        peopleService.sendRabbitmq("hello rabbitmq");
        log.info(">>>>>>>>>>>>>rabbitmq消息发送成功<<<<<<<<<<<<<<<<<<");
    }
}
